package com.iraeta.service.xiangmu.impl;

import com.iraeta.dao.xiangmu.GyspjDao;
import com.iraeta.entity.xiangmu.Gyspj;
import com.iraeta.service.xiangmu.GyspjService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GyspjServiceImpl implements GyspjService {
    @Autowired
    GyspjDao gyspjDao;

    @Override
    public List<Gyspj> listXmGyspj(int xmId) {
        return gyspjDao.selectByGysid(xmId);
    }

    @Override
    public void addGyspj(Gyspj gyspj) {
        gyspjDao.insert(gyspj);
    }

    @Override
    public void deleteGyspj(int id) {
        gyspjDao.deleteByPrimaryKey(id);
    }
}
